﻿using System;

namespace Malu.WebTemplates
{
    public class Order : System.Web.UI.UserControl
    {
        public string OrderColumn
        {
            get
            {
                if (ViewState["OrderColumn"] == null)
                {
                    ViewState["OrderColumn"] = string.Empty;
                }
                return ViewState["OrderColumn"].ToString();
            }
            set
            {
                ViewState["OrderColumn"] = value;
                if (this.OrderChanged != null)
                    this.OrderChanged(this, new EventArgs());
            }
        }

        public string OrderDirection
        {
            get
            {
                if (ViewState["OrderDirection"] == null)
                {
                    ViewState["OrderDirection"] = string.Empty;
                }
                return ViewState["OrderDirection"].ToString();
            }
            set
            {
                ViewState["OrderDirection"] = value;
                if (this.OrderChanged != null)
                    this.OrderChanged(this, new EventArgs());
            }
        }

        public event OrderChangeEventHandler OrderChanged;

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}